<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TMCStepper: src/source/TMCStepper.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TMCStepper
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_t_m_c_stepper_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TMCStepper.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_t_m_c_stepper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c_stepper_8h.html">TMCStepper.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">  Requested current = mA = I_rms/1000</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">  Equation for current:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">  I_rms = (CS+1)/32 * V_fs/(R_sense+0.02ohm) * 1/sqrt(2)</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">  Solve for CS -&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">  CS = 32*sqrt(2)*I_rms*(R_sense+0.02)/V_fs - 1</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">  Example:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">  vsense = 0b0 -&gt; V_fs = 0.325V</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">  mA = 1640mA = I_rms/1000 = 1.64A</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">  R_sense = 0.10 Ohm</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">  -&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">  CS = 32*sqrt(2)*1.64*(0.10+0.02)/0.325 - 1 = 26.4</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">  CS = 26</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ae6829e76ae67523a4cb60553dd70fece">   20</a></span>&#160;uint16_t <a class="code" href="class_t_m_c_stepper.html#ae6829e76ae67523a4cb60553dd70fece">TMCStepper::cs2rms</a>(uint8_t CS) {</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keywordflow">return</span> (<span class="keywordtype">float</span>)(CS+1)/32.0 * (<a class="code" href="class_t_m_c_stepper.html#ab4366bc26a0f6a4bb1c6c33da5919238">vsense</a>() ? 0.180 : 0.325)/(<a class="code" href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">Rsense</a>+0.02) / 1.41421 * 1000;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#af6bd7fc36dabb23fee412d7293a3bb75">   24</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">TMCStepper::rms_current</a>(uint16_t mA) {</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  uint8_t CS = 32.0*1.41421*mA/1000.0*(<a class="code" href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">Rsense</a>+0.02)/0.325 - 1;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="comment">// If Current Scale is too low, turn on high sensitivity R_sense and calculate again</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keywordflow">if</span> (CS &lt; 16) {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="class_t_m_c_stepper.html#ab4366bc26a0f6a4bb1c6c33da5919238">vsense</a>(<span class="keyword">true</span>);</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    CS = 32.0*1.41421*mA/1000.0*(<a class="code" href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">Rsense</a>+0.02)/0.180 - 1;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  } <span class="keywordflow">else</span> { <span class="comment">// If CS &gt;= 16, turn off high_sense_r</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <a class="code" href="class_t_m_c_stepper.html#ab4366bc26a0f6a4bb1c6c33da5919238">vsense</a>(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  }</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keywordflow">if</span> (CS &gt; 31)</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    CS = 31;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">irun</a>(CS);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a5f7f8f6ce7b394449239bc2c05f39c8f">ihold</a>(CS*<a class="code" href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">holdMultiplier</a>);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="comment">//val_mA = mA;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ab42a120cb3172ce493b88f02e0233f9a">   41</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">TMCStepper::rms_current</a>(uint16_t mA, <span class="keywordtype">float</span> mult) {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">holdMultiplier</a> = mult;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">rms_current</a>(mA);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">   46</a></span>&#160;uint16_t <a class="code" href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">TMCStepper::rms_current</a>() {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#ae6829e76ae67523a4cb60553dd70fece">cs2rms</a>(<a class="code" href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">irun</a>());</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;}</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#af78274ede700b49d9fa03284a9eabcd4">   50</a></span>&#160;uint8_t <a class="code" href="class_t_m_c_stepper.html#af78274ede700b49d9fa03284a9eabcd4">TMCStepper::test_connection</a>() {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  uint32_t drv_status = <a class="code" href="class_t_m_c_stepper.html#a5ea6ccc4c32966e40b26e56afd1c633b">DRV_STATUS</a>();</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keywordflow">switch</span> (drv_status) {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;      <span class="keywordflow">case</span> 0xFFFFFFFF: <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> 2;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      <span class="keywordflow">default</span>: <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;}</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a6bf501e3e9b1c929e95a15f1d8279595">   59</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#a8bc339ee30404455a56f32a915300fb6">TMCStepper::hysteresis_end</a>(int8_t value) { <a class="code" href="class_t_m_c_stepper.html#a477c74581a2be9909579bab12dc2642a">hend</a>(value+3); }</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a8bc339ee30404455a56f32a915300fb6">   60</a></span>&#160;int8_t <a class="code" href="class_t_m_c_stepper.html#a8bc339ee30404455a56f32a915300fb6">TMCStepper::hysteresis_end</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#a477c74581a2be9909579bab12dc2642a">hend</a>()-3; };</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a87670296ab7633ec9aba23f86ea98085">   62</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#ac06189981d4400bf5961719f468c39b1">TMCStepper::hysteresis_start</a>(uint8_t value) { <a class="code" href="class_t_m_c_stepper.html#ae40affb96ca05b4380adbdd961b62c7e">hstrt</a>(value-1); }</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac06189981d4400bf5961719f468c39b1">   63</a></span>&#160;uint8_t <a class="code" href="class_t_m_c_stepper.html#ac06189981d4400bf5961719f468c39b1">TMCStepper::hysteresis_start</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#ae40affb96ca05b4380adbdd961b62c7e">hstrt</a>()+1; }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a4c069724c002dc830fcb12c3cf5a92e1">   65</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#ae629000976699f001fc9b193856d9074">TMCStepper::microsteps</a>(uint16_t ms) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keywordflow">switch</span>(ms) {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">case</span> 256: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(0); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">case</span> 128: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(1); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordflow">case</span>  64: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(2); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">case</span>  32: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(3); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">case</span>  16: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(4); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">case</span>   8: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(5); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordflow">case</span>   4: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(6); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">case</span>   2: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(7); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">case</span>   0: <a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>(8); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">default</span>: <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ae629000976699f001fc9b193856d9074">   80</a></span>&#160;uint16_t <a class="code" href="class_t_m_c_stepper.html#ae629000976699f001fc9b193856d9074">TMCStepper::microsteps</a>() {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keywordflow">switch</span>(<a class="code" href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">mres</a>()) {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">case</span> 0: <span class="keywordflow">return</span> 256;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> 128;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span>  64;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span>  32;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">case</span> 4: <span class="keywordflow">return</span>  16;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">case</span> 5: <span class="keywordflow">return</span>   8;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">case</span> 6: <span class="keywordflow">return</span>   4;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">case</span> 7: <span class="keywordflow">return</span>   2;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">case</span> 8: <span class="keywordflow">return</span>   0;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a889e66a7d32f607b4e22299aab6e9c99">   95</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#aea3d94ca7be0fb510c6432cb95a9e6af">TMCStepper::blank_time</a>(uint8_t value) {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keywordflow">switch</span> (value) {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">case</span> 16: <a class="code" href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">tbl</a>(0b00); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordflow">case</span> 24: <a class="code" href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">tbl</a>(0b01); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">case</span> 36: <a class="code" href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">tbl</a>(0b10); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">case</span> 54: <a class="code" href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">tbl</a>(0b11); <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#aea3d94ca7be0fb510c6432cb95a9e6af">  104</a></span>&#160;uint8_t <a class="code" href="class_t_m_c_stepper.html#aea3d94ca7be0fb510c6432cb95a9e6af">TMCStepper::blank_time</a>() {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordflow">switch</span> (<a class="code" href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">tbl</a>()) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">case</span> 0b00: <span class="keywordflow">return</span> 16;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">case</span> 0b01: <span class="keywordflow">return</span> 24;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">case</span> 0b10: <span class="keywordflow">return</span> 36;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keywordflow">case</span> 0b11: <span class="keywordflow">return</span> 54;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment">// R+C: GSTAT</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">  116</a></span>&#160;uint8_t <a class="code" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">TMCStepper::GSTAT</a>()  { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#a55984b797e1b4d3fd9e253277b19b8bd">read</a>(<a class="code" href="struct_g_s_t_a_t__t.html#a1baf6bc1058bf129b7cddd89ae93e507">GSTAT_t::address</a>); }</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#af834b7aecb144c7d5c3ba1494eb447a8">  117</a></span>&#160;<span class="keywordtype">void</span>  <a class="code" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">TMCStepper::GSTAT</a>(uint8_t){ <a class="code" href="class_t_m_c_stepper.html#a0c59db39db2a63ddae01f0545196edeb">write</a>(<a class="code" href="struct_g_s_t_a_t__t.html#a1baf6bc1058bf129b7cddd89ae93e507">GSTAT_t::address</a>, 0b111); }</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ab3cc9688f015f07d65cca651c4c50299">  118</a></span>&#160;<span class="keywordtype">bool</span>  <a class="code" href="class_t_m_c_stepper.html#ab3cc9688f015f07d65cca651c4c50299">TMCStepper::reset</a>()    { <a class="code" href="struct_g_s_t_a_t__t.html">GSTAT_t</a> r; r.<a class="code" href="struct_g_s_t_a_t__t.html#ae5aaab7ffd317def5532fae52dc1f602">sr</a> = <a class="code" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">GSTAT</a>(); <span class="keywordflow">return</span> r.<a class="code" href="struct_g_s_t_a_t__t.html#a3a5e2d2e296f693f4770d102731f07de">reset</a>; }</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a547e59743734b01749efd52210a0bd02">  119</a></span>&#160;<span class="keywordtype">bool</span>  <a class="code" href="class_t_m_c_stepper.html#a547e59743734b01749efd52210a0bd02">TMCStepper::drv_err</a>()  { <a class="code" href="struct_g_s_t_a_t__t.html">GSTAT_t</a> r; r.<a class="code" href="struct_g_s_t_a_t__t.html#ae5aaab7ffd317def5532fae52dc1f602">sr</a> = <a class="code" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">GSTAT</a>(); <span class="keywordflow">return</span> r.<a class="code" href="struct_g_s_t_a_t__t.html#a1238dcdc1cd37262314295a597423bf0">drv_err</a>; }</div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a4d6aef5354024120e47d7d638edcbfe7">  120</a></span>&#160;<span class="keywordtype">bool</span>  <a class="code" href="class_t_m_c_stepper.html#a4d6aef5354024120e47d7d638edcbfe7">TMCStepper::uv_cp</a>()    { <a class="code" href="struct_g_s_t_a_t__t.html">GSTAT_t</a> r; r.<a class="code" href="struct_g_s_t_a_t__t.html#ae5aaab7ffd317def5532fae52dc1f602">sr</a> = <a class="code" href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">GSTAT</a>(); <span class="keywordflow">return</span> r.<a class="code" href="struct_g_s_t_a_t__t.html#afefa7f9e8e56da42ee90f9abe754ba71">uv_cp</a>; }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">// W: TPOWERDOWN</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">  123</a></span>&#160;uint8_t <a class="code" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a>() { <span class="keywordflow">return</span> TPOWERDOWN_register.sr; }</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a3c46d790163af9e4ccbb662916563938">  124</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a>(uint8_t input) {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  TPOWERDOWN_register.sr = input;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a0c59db39db2a63ddae01f0545196edeb">write</a>(TPOWERDOWN_register.address, TPOWERDOWN_register.sr);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;}</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="comment">// R: TSTEP</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac3b12d35df63eeb8cfed2ce410ea0050">  130</a></span>&#160;uint32_t <a class="code" href="class_t_m_c_stepper.html#ac3b12d35df63eeb8cfed2ce410ea0050">TMCStepper::TSTEP</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#a55984b797e1b4d3fd9e253277b19b8bd">read</a>(<a class="code" href="struct_t_m_c_stepper_1_1_t_s_t_e_p__t.html#a914364338c8f2b817206d3254d65cb17">TSTEP_t::address</a>); }</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">// W: TPWMTHRS</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">  133</a></span>&#160;uint32_t <a class="code" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a>() { <span class="keywordflow">return</span> TPWMTHRS_register.sr; }</div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a4e609d7f77d9e6db6423b02b98ed5358">  134</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a>(uint32_t input) {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  TPWMTHRS_register.sr = input;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <a class="code" href="class_t_m_c_stepper.html#a0c59db39db2a63ddae01f0545196edeb">write</a>(TPWMTHRS_register.address, TPWMTHRS_register.sr);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;}</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a5c93e348deec2455319c4ec819ac83fa">  139</a></span>&#160;uint16_t <a class="code" href="class_t_m_c_stepper.html#a5c93e348deec2455319c4ec819ac83fa">TMCStepper::MSCNT</a>() {</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#a55984b797e1b4d3fd9e253277b19b8bd">read</a>(<a class="code" href="struct_t_m_c_stepper_1_1_m_s_c_n_t__t.html#a8547c493ebe234b66c1bffa5221a9d55">MSCNT_t::address</a>);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac2a244b29e2256064a7ec2e07d694d61">  143</a></span>&#160;uint32_t <a class="code" href="class_t_m_c_stepper.html#ac2a244b29e2256064a7ec2e07d694d61">TMCStepper::MSCURACT</a>() { <span class="keywordflow">return</span> <a class="code" href="class_t_m_c_stepper.html#a55984b797e1b4d3fd9e253277b19b8bd">read</a>(<a class="code" href="struct_m_s_c_u_r_a_c_t__t.html#a23e7acb5d1ab8d64d18a5bf0134cf865">MSCURACT_t::address</a>); }</div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#a58d924967fb53750c162d0e9c4d2020c">  144</a></span>&#160;int16_t <a class="code" href="class_t_m_c_stepper.html#a58d924967fb53750c162d0e9c4d2020c">TMCStepper::cur_a</a>() {</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <a class="code" href="struct_m_s_c_u_r_a_c_t__t.html">MSCURACT_t</a> r{0};</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  r.<a class="code" href="struct_m_s_c_u_r_a_c_t__t.html#a9fad5827d0bfe84594a9840a03cc745c">sr</a> = <a class="code" href="class_t_m_c_stepper.html#ac2a244b29e2256064a7ec2e07d694d61">MSCURACT</a>();</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  int16_t value = r.cur_a;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <span class="keywordflow">if</span> (value &gt; 255) value -= 512;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="keywordflow">return</span> value;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;}</div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="class_t_m_c_stepper.html#ac7451afd82d3ebac91fe607d4bab65f8">  151</a></span>&#160;int16_t <a class="code" href="class_t_m_c_stepper.html#ac7451afd82d3ebac91fe607d4bab65f8">TMCStepper::cur_b</a>() {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <a class="code" href="struct_m_s_c_u_r_a_c_t__t.html">MSCURACT_t</a> r{0};</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  r.<a class="code" href="struct_m_s_c_u_r_a_c_t__t.html#a9fad5827d0bfe84594a9840a03cc745c">sr</a> = <a class="code" href="class_t_m_c_stepper.html#ac2a244b29e2256064a7ec2e07d694d61">MSCURACT</a>();</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  int16_t value = r.cur_b;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <span class="keywordflow">if</span> (value &gt; 255) value -= 512;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordflow">return</span> value;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_t_m_c_stepper_html_a5ecb8e45ce8ab535bbc3f9f69e8c2657"><div class="ttname"><a href="class_t_m_c_stepper.html#a5ecb8e45ce8ab535bbc3f9f69e8c2657">TMCStepper::mres</a></div><div class="ttdeci">virtual uint8_t mres()=0</div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html_a3a5e2d2e296f693f4770d102731f07de"><div class="ttname"><a href="struct_g_s_t_a_t__t.html#a3a5e2d2e296f693f4770d102731f07de">GSTAT_t::reset</a></div><div class="ttdeci">bool reset</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00060">TMC2130_bitfields.h:60</a></div></div>
<div class="ttc" id="astruct_m_s_c_u_r_a_c_t__t_html_a23e7acb5d1ab8d64d18a5bf0134cf865"><div class="ttname"><a href="struct_m_s_c_u_r_a_c_t__t.html#a23e7acb5d1ab8d64d18a5bf0134cf865">MSCURACT_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00090">TMC2208_bitfields.h:90</a></div></div>
<div class="ttc" id="astruct_m_s_c_u_r_a_c_t__t_html_a9fad5827d0bfe84594a9840a03cc745c"><div class="ttname"><a href="struct_m_s_c_u_r_a_c_t__t.html#a9fad5827d0bfe84594a9840a03cc745c">MSCURACT_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00092">TMC2208_bitfields.h:92</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_aa53995cb5d59c70a26f45b53a248b704"><div class="ttname"><a href="class_t_m_c_stepper.html#aa53995cb5d59c70a26f45b53a248b704">TMCStepper::tbl</a></div><div class="ttdeci">virtual uint8_t tbl()=0</div></div>
<div class="ttc" id="astruct_m_s_c_u_r_a_c_t__t_html"><div class="ttname"><a href="struct_m_s_c_u_r_a_c_t__t.html">MSCURACT_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00089">TMC2208_bitfields.h:89</a></div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html_afefa7f9e8e56da42ee90f9abe754ba71"><div class="ttname"><a href="struct_g_s_t_a_t__t.html#afefa7f9e8e56da42ee90f9abe754ba71">GSTAT_t::uv_cp</a></div><div class="ttdeci">bool uv_cp</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00062">TMC2130_bitfields.h:62</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a4d6aef5354024120e47d7d638edcbfe7"><div class="ttname"><a href="class_t_m_c_stepper.html#a4d6aef5354024120e47d7d638edcbfe7">TMCStepper::uv_cp</a></div><div class="ttdeci">bool uv_cp()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00120">TMCStepper.cpp:120</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a55984b797e1b4d3fd9e253277b19b8bd"><div class="ttname"><a href="class_t_m_c_stepper.html#a55984b797e1b4d3fd9e253277b19b8bd">TMCStepper::read</a></div><div class="ttdeci">virtual uint32_t read(uint8_t)=0</div></div>
<div class="ttc" id="a_t_m_c_stepper_8h_html"><div class="ttname"><a href="_t_m_c_stepper_8h.html">TMCStepper.h</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_aaa5cfefaf915e98eb9700bda48f99337"><div class="ttname"><a href="class_t_m_c_stepper.html#aaa5cfefaf915e98eb9700bda48f99337">TMCStepper::rms_current</a></div><div class="ttdeci">uint16_t rms_current()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00046">TMCStepper.cpp:46</a></div></div>
<div class="ttc" id="astruct_t_m_c_stepper_1_1_m_s_c_n_t__t_html_a8547c493ebe234b66c1bffa5221a9d55"><div class="ttname"><a href="struct_t_m_c_stepper_1_1_m_s_c_n_t__t.html#a8547c493ebe234b66c1bffa5221a9d55">TMCStepper::MSCNT_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00117">TMCStepper.h:117</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a14c403e6532fc10860f3accd9c5a5433"><div class="ttname"><a href="class_t_m_c_stepper.html#a14c403e6532fc10860f3accd9c5a5433">TMCStepper::Rsense</a></div><div class="ttdeci">const float Rsense</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00133">TMCStepper.h:133</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ae40affb96ca05b4380adbdd961b62c7e"><div class="ttname"><a href="class_t_m_c_stepper.html#ae40affb96ca05b4380adbdd961b62c7e">TMCStepper::hstrt</a></div><div class="ttdeci">virtual uint8_t hstrt()=0</div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_aea3d94ca7be0fb510c6432cb95a9e6af"><div class="ttname"><a href="class_t_m_c_stepper.html#aea3d94ca7be0fb510c6432cb95a9e6af">TMCStepper::blank_time</a></div><div class="ttdeci">uint8_t blank_time()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00104">TMCStepper.cpp:104</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac3b12d35df63eeb8cfed2ce410ea0050"><div class="ttname"><a href="class_t_m_c_stepper.html#ac3b12d35df63eeb8cfed2ce410ea0050">TMCStepper::TSTEP</a></div><div class="ttdeci">uint32_t TSTEP()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00130">TMCStepper.cpp:130</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ae6829e76ae67523a4cb60553dd70fece"><div class="ttname"><a href="class_t_m_c_stepper.html#ae6829e76ae67523a4cb60553dd70fece">TMCStepper::cs2rms</a></div><div class="ttdeci">uint16_t cs2rms(uint8_t CS)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00020">TMCStepper.cpp:20</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a0c59db39db2a63ddae01f0545196edeb"><div class="ttname"><a href="class_t_m_c_stepper.html#a0c59db39db2a63ddae01f0545196edeb">TMCStepper::write</a></div><div class="ttdeci">virtual void write(uint8_t, uint32_t)=0</div></div>
<div class="ttc" id="a_t_m_c___m_a_c_r_o_s_8h_html"><div class="ttname"><a href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a5c93e348deec2455319c4ec819ac83fa"><div class="ttname"><a href="class_t_m_c_stepper.html#a5c93e348deec2455319c4ec819ac83fa">TMCStepper::MSCNT</a></div><div class="ttdeci">uint16_t MSCNT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00139">TMCStepper.cpp:139</a></div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html_ae5aaab7ffd317def5532fae52dc1f602"><div class="ttname"><a href="struct_g_s_t_a_t__t.html#ae5aaab7ffd317def5532fae52dc1f602">GSTAT_t::sr</a></div><div class="ttdeci">uint8_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00058">TMC2130_bitfields.h:58</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a58d924967fb53750c162d0e9c4d2020c"><div class="ttname"><a href="class_t_m_c_stepper.html#a58d924967fb53750c162d0e9c4d2020c">TMCStepper::cur_a</a></div><div class="ttdeci">int16_t cur_a()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00144">TMCStepper.cpp:144</a></div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html_a1238dcdc1cd37262314295a597423bf0"><div class="ttname"><a href="struct_g_s_t_a_t__t.html#a1238dcdc1cd37262314295a597423bf0">GSTAT_t::drv_err</a></div><div class="ttdeci">bool drv_err</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00061">TMC2130_bitfields.h:61</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ab4366bc26a0f6a4bb1c6c33da5919238"><div class="ttname"><a href="class_t_m_c_stepper.html#ab4366bc26a0f6a4bb1c6c33da5919238">TMCStepper::vsense</a></div><div class="ttdeci">virtual bool vsense(void)=0</div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac2a244b29e2256064a7ec2e07d694d61"><div class="ttname"><a href="class_t_m_c_stepper.html#ac2a244b29e2256064a7ec2e07d694d61">TMCStepper::MSCURACT</a></div><div class="ttdeci">uint32_t MSCURACT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00143">TMCStepper.cpp:143</a></div></div>
<div class="ttc" id="astruct_t_m_c_stepper_1_1_t_s_t_e_p__t_html_a914364338c8f2b817206d3254d65cb17"><div class="ttname"><a href="struct_t_m_c_stepper_1_1_t_s_t_e_p__t.html#a914364338c8f2b817206d3254d65cb17">TMCStepper::TSTEP_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00116">TMCStepper.h:116</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a8bc339ee30404455a56f32a915300fb6"><div class="ttname"><a href="class_t_m_c_stepper.html#a8bc339ee30404455a56f32a915300fb6">TMCStepper::hysteresis_end</a></div><div class="ttdeci">int8_t hysteresis_end()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00060">TMCStepper.cpp:60</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a477c74581a2be9909579bab12dc2642a"><div class="ttname"><a href="class_t_m_c_stepper.html#a477c74581a2be9909579bab12dc2642a">TMCStepper::hend</a></div><div class="ttdeci">virtual uint8_t hend()=0</div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ae629000976699f001fc9b193856d9074"><div class="ttname"><a href="class_t_m_c_stepper.html#ae629000976699f001fc9b193856d9074">TMCStepper::microsteps</a></div><div class="ttdeci">uint16_t microsteps()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00080">TMCStepper.cpp:80</a></div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html"><div class="ttname"><a href="struct_g_s_t_a_t__t.html">GSTAT_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00055">TMC2130_bitfields.h:55</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ab3cc9688f015f07d65cca651c4c50299"><div class="ttname"><a href="class_t_m_c_stepper.html#ab3cc9688f015f07d65cca651c4c50299">TMCStepper::reset</a></div><div class="ttdeci">bool reset()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00118">TMCStepper.cpp:118</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a89f965f7d005e189ef27951f37e699f2"><div class="ttname"><a href="class_t_m_c_stepper.html#a89f965f7d005e189ef27951f37e699f2">TMCStepper::irun</a></div><div class="ttdeci">uint8_t irun()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00019">IHOLD_IRUN.cpp:19</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a66812c883dfbb6dedc046a011b2564be"><div class="ttname"><a href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a></div><div class="ttdeci">uint8_t TPOWERDOWN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00123">TMCStepper.cpp:123</a></div></div>
<div class="ttc" id="astruct_g_s_t_a_t__t_html_a1baf6bc1058bf129b7cddd89ae93e507"><div class="ttname"><a href="struct_g_s_t_a_t__t.html#a1baf6bc1058bf129b7cddd89ae93e507">GSTAT_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2130__bitfields_8h_source.html#l00056">TMC2130_bitfields.h:56</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a5ea6ccc4c32966e40b26e56afd1c633b"><div class="ttname"><a href="class_t_m_c_stepper.html#a5ea6ccc4c32966e40b26e56afd1c633b">TMCStepper::DRV_STATUS</a></div><div class="ttdeci">virtual uint32_t DRV_STATUS()=0</div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ab450b20e430d79770ab8d5af4cc977e8"><div class="ttname"><a href="class_t_m_c_stepper.html#ab450b20e430d79770ab8d5af4cc977e8">TMCStepper::holdMultiplier</a></div><div class="ttdeci">float holdMultiplier</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00134">TMCStepper.h:134</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_af78274ede700b49d9fa03284a9eabcd4"><div class="ttname"><a href="class_t_m_c_stepper.html#af78274ede700b49d9fa03284a9eabcd4">TMCStepper::test_connection</a></div><div class="ttdeci">uint8_t test_connection()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00050">TMCStepper.cpp:50</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac7874c4b56bd1b3acce522c1e7d7dfed"><div class="ttname"><a href="class_t_m_c_stepper.html#ac7874c4b56bd1b3acce522c1e7d7dfed">TMCStepper::GSTAT</a></div><div class="ttdeci">uint8_t GSTAT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00116">TMCStepper.cpp:116</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a547e59743734b01749efd52210a0bd02"><div class="ttname"><a href="class_t_m_c_stepper.html#a547e59743734b01749efd52210a0bd02">TMCStepper::drv_err</a></div><div class="ttdeci">bool drv_err()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00119">TMCStepper.cpp:119</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac06189981d4400bf5961719f468c39b1"><div class="ttname"><a href="class_t_m_c_stepper.html#ac06189981d4400bf5961719f468c39b1">TMCStepper::hysteresis_start</a></div><div class="ttdeci">uint8_t hysteresis_start()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00063">TMCStepper.cpp:63</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac7451afd82d3ebac91fe607d4bab65f8"><div class="ttname"><a href="class_t_m_c_stepper.html#ac7451afd82d3ebac91fe607d4bab65f8">TMCStepper::cur_b</a></div><div class="ttdeci">int16_t cur_b()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00151">TMCStepper.cpp:151</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a5f7f8f6ce7b394449239bc2c05f39c8f"><div class="ttname"><a href="class_t_m_c_stepper.html#a5f7f8f6ce7b394449239bc2c05f39c8f">TMCStepper::ihold</a></div><div class="ttdeci">uint8_t ihold()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00018">IHOLD_IRUN.cpp:18</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac59a9305aafc64a63698a34cac404788"><div class="ttname"><a href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a></div><div class="ttdeci">uint32_t TPWMTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00133">TMCStepper.cpp:133</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_94e7a0fbe7f8eaf7f05ee7b02c647e9f.html">source</a></li><li class="navelem"><a class="el" href="_t_m_c_stepper_8cpp.html">TMCStepper.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
